<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> 
<head>
<title>Rotor Build Environment Variable Scripts</title>
<link rel="stylesheet" type="text/css" href="../rotor.css">
</head>
<body>		

<h1>Shared Source CLI 2.0 Build Environment Variable Scripts</h1>

<h2>(env.bat, env.csh, env.sh)</h2>

<p>Contents:</p>

<ul>
  <li><a href="#Overview">Overview</a></li>
  <li><a href="#SSCLIEnvironmentVariablesonWindows">SSCLI Environment Variables 
  on Windows</a></li><ul>
  <li><a href="#TableofEnvironmentVariablesonWindows">Table of Environment 
  Variables on Windows</a></li>
</ul>
</ul>

<h2><a name="Overview"></a>Overview</h2>
 
<p>The Shared Source CLI 2.0 (SSCLI) build process requires specific environment 
variables to be set in order to function.&nbsp; Several files have been included 
in the SSCLI source tree to help correctly set these environment variables in a console 
window.</p>

<p>You should always run these files from the root of the SSCLI source tree 
because they will set paths relative to the directory location from which they 
are run.</p>

<h4>Usage</h4>

<p>On Microsoft&reg; Windows:</p>

<blockquote>

	<code>env [<i>option</i>]</code>
 
</blockquote>

<h4>Options</h4>

 
<table border=1 width=100%>

<TR VALIGN="top" width=100%>
<TH width=33%>Option (build type)</TH>
<TH width=67%>Description</TH>
</TR>

<TR VALIGN="top">
<TD width=33%>
    <strong>debug</strong></TD>
<TD width=67%>Turns optimizations off, enables debug code, generates&nbsp;debugging 
symbols.</TD>
</TR>

<TR VALIGN="top">
<TD width=33%><b>checked</b></TD>
<TD width=67%>Turns optimizations on, enables debug code, generates&nbsp;debugging 
symbols.</TD>
</TR>

<TR VALIGN="top">
<TD width=33%><b>free</b></TD>
<TD width=67%>Turns optimizations on, disables debug code, generates&nbsp;debugging 
symbols.</TD>
</TR>

</table>

 
<h2><a name="SSCLIEnvironmentVariablesonWindows"></a>SSCLI Environment Variables on Windows</h2>
<p>On Windows the SSCLI build process depends on several external applications 
already having been installed:</p>
<ul>
  <li>Microsoft Visual Studio&reg; 2005 Standard<ul>
    <li>The SSCLI build process requires a C++ compiler and some header files.</li>
  </ul>
  </li>
  <li>Perl<ul>
    <li>You can obtain a download of Perl for Windows from
    <a href="http://www.activestate.com">www.activestate.com</a> </li>
  </ul>
  </li>
</ul>
<p>To set up your SSCLI build environment on Windows, switch to 
the root directory of the SSCLI directory tree and run the env.bat file with the  option 
you want. Several external batch files are called from env.bat.</p>
<ul>
  <li>vsvarsall.bat<ul>
    <li>This is created by  Visual Studio 2005 and sets environment 
    variables to access the Visual Studio command-line tools.</li>
  </ul>
  </li>
  <li>win.env.bat<ul>
    <li>This is part of the SSCLI build environment.&nbsp; The file is located at sscli20\.
    </li>
  </ul>
  </li>
</ul>
<h4><a name="TableofEnvironmentVariablesonWindows"></a>Table of Environment Variables on Windows</h4>
<table border="1" width="100%">

  <tr width="100%">
    <th width="27%">Environment variable</th>
    <th width="27%">Value</th>
    <th width="46%">Description</th>
  </tr>
  <tr>
    <td width="27%">BROWSER_INFO</td>
    <td width="27%">1</td>
    <td width="46%">Not usually modified.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">BUILD_ALT_DIR</td>
    <td width="27%">Depends on build type:<ul>
      <li>c in checked</li>
      <li>d in debug</li><li>set to nothing in free</li>
      </ul>
      </td>
    <td width="46%">Not usually modified.&nbsp; Used by the build utility.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">BUILD_DEFAULT</td>
    <td width="27%">
        -mwe -a -M -wx</td>
    <td width="46%">Default flags used by the build utility.&nbsp; 
    Build flags are documented in <a href="buildutility.html">buildutility.html</a><p>The 
    flags following -nmake are passed through to the nmake.exe make tool.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">BUILD_DEFAULT_TARGETS</td>
    <td width="27%">&nbsp;-dynamic %TARGET_DIRECTORY%</td>
    <td width="46%">Not usually modified. Used by the build utility to find make 
        tool and other defaults.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">COFFBASE_TXT_FILE</td>
    <td width="27%">%ROTOR_DIR%\env\*\coffbase.txt</td>
    <td width="46%">Sets .dll file base addresses for building Windows dynamic 
    libraries (DLLs).&nbsp; Not usually modified.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">COPYCMD</td>
    <td width="27%">/Y</td>
    <td width="46%">Not usually modified. Allows copying without confirmation.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">CRT_INC_PATH</td>
    <td width="27%">%ROTOR_DIR%\palrt\inc</td>
    <td width="46%">Not usually modified.&nbsp;Path to required C runtime include files</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">CRT_LIB_PATH</td>
    <td width="27%">
        %VCINSTALLDIR%\VC\lib files</td>
    <td width="46%">Path to Microsoft Visual C++ 2005 .lib files</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">C_DEFINES</td>
    <td width="27%">Can vary with build type.</td>
    <td width="46%"><p>#define values passed to the compiler during 
    the build.<p>These are set in rotorenv.bat.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">
        _BUILDTYPE</td>
    <td width="27%">Depends on build type.<ul>
      <li>checked in checked</li>
      <li>fastchecked in fastchecked</li>
      <li>free in free</li>
    </ul>
    </td>
    <td width="46%">Set by input to env.bat.&nbsp;Used by other environment variables to build 
    path to binary build output.<p>&nbsp;</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">DEBUG_CRTS</td>
    <td width="27%">1</td>
    <td width="46%">Not usually modified.&nbsp;Set by rotorenv.bat.<p>Set in 
    both 
    checked and fastchecked builds.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">DevEnvDir</td>
    <td width="27%">%VSINSTALLDIR%\Common7\IDE</td>
    <td width="46%">Path to Visual Studio 2005 development environment</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">FEATURE_PAL</td>
    <td width="27%">1</td>
    <td width="46%">Not usually modified.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">FrameworkDir</td>
    <td width="27%">%FrameworkDir%</td>
    <td width="46%">Not usually modified. Set in vsvarsall.bat</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">FrameworkSDKDir</td>
    <td width="27%">%FrameworkSDKDir%</td>
    <td width="46%">Not usually modified. Set in vsvarsall.bat</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">FrameworkVersion</td>
    <td width="27%">%FrameworkVersion%</td>
    <td width="46%">Not usually modified. Set in vsvarsall.bat</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">MSC_OPTIMIZATION</td>
    <td width="27%">
        /O1</td>
    <td width="46%">Microsoft&reg;  Visual C++ 2005 compiler optimization switches.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">MSVCDir</td>
    <td width="27%">
        %VCINSTALLDIR%\VC</td>
    <td width="46%">Not usually modified.&nbsp; Path to Microsoft Visual C++ 2005 root directory.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">NTDEBUG</td>
    <td width="27%">ntsd</td>
    <td width="46%">Not usually modified.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">NTDEBUGTYPE</td>
    <td width="27%">vc6</td>
    <td width="46%">Not usually modified.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">NTMAKEENV</td>
    <td width="27%">
        %ROTOR_DIR%\env\bin</td>
    <td width="46%">Not usually modified.&nbsp; Path to SSCLI build tools and 
    scripts.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">Path</td>
    <td width="27%">
    %PATH%</td>
    <td width="46%">
    After running env.bat, the path will include directories in SSCLI, Visual 
    Studio .NET, 
    and the Microsoft .NET Framework SDK.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">ROTOR_DIR</td>
    <td width="27%">%ROTOR_DIR%</td>
    <td width="46%">Path to root of SSCLI source directory. Set by env.bat 
    to the location where it is executed.</td>
  </tr>
    <tr valign="top">
        <td width="27%">
            ROTOR_TOOLSET</td>
        <td width="27%">
            MSVC</td>
        <td width="46%">
        </td>
    </tr>
    <tr valign="top">
        <td width="27%">
            ROTOR_TOOLSET_VERSION</td>
        <td width="27%">
            80</td>
        <td width="46%">
        </td>
    </tr>
  <tr VALIGN="top">
    <td width="27%">SDK_INC_PATH</td>
    <td width="27%">
        %ROTOR_DIR%\pal\inc;</td>
    <td width="46%">Not usually modified. Path to required SSCLI platform 
    include data in rotor_pal.h.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">SDK_LIB_PATH</td>
    <td width="27%">
        %VCINSTALLDIR%\VC\PlatformSDK\lib</td>
    <td width="46%">Not usually modified. Path to Visual Studio 2005 .lib files.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">USE_PDB</td>
    <td width="27%">Depends on build type:<ul>
      <li>1 in checked and fastchecked.</li>
      <li>not set in free.</li>
    </ul>
    </td>
    <td width="46%">Not usually modified.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">VCINSTALLDIR</td>
    <td width="27%">Depends on install location of Visual Studio</td>
    <td width="46%">Root of Visual Studio installation.&nbsp; Set by vsvarsall.bat.</td>
  </tr>
    <tr valign="top">
        <td width="27%">
            VC_BIN_PATH</td>
        <td width="27%">
            %VCINSTALLDIR%\VC\bin</td>
        <td width="46%">
        </td>
    </tr>
  <tr VALIGN="top">
    <td width="27%">VSINSTALLDIR</td>
    <td width="27%">Depends on install location of Visual Studio</td>
    <td width="46%">Root of IDE location in Visual Studio installation.&nbsp; 
    Set by vsvarsall.bat.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">_NTDRIVE</td>
    <td width="27%">Depends on root installation of SSCLI.</td>
    <td width="46%">Not usually modified.<p>Drive letter of path in %ROTOR_DIR%</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">_NTROOT</td>
    <td width="27%">%ROTOR_DIR%\clr</td>
    <td width="46%">Not usually modified.<p>Root of clr directory.</td>
  </tr>
    <tr valign="top">
        <td width="27%">
            _NTTREE</td>
        <td width="27%">
            %ROTOR_DIR%\binaries.x86*.rotor\</td>
        <td width="46%">
            Not usually modified<br />
            <br />
            Location where build output goes.</td>
    </tr>
  <tr VALIGN="top">
    <td width="27%">_NT_DEBUGGER_EXTENSION_PATH</td>
    <td width="27%">%ROTOR_DIR%\binaries.x86*.rotor\int_tools</td>
    <td width="46%">Not usually modified.<p>Location where debugger extension 
    file SOS is copied.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">_NT_SYMBOL_PATH</td>
    <td width="27%">%ROTOR_DIR%\binaries.x86*.rotor\</td>
    <td width="46%">Not usually modified.<p>Location of debug symbolic 
    information (.ildb files)</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">_TGTCPU</td>
    <td width="27%">i386</td>
    <td width="46%">Not usually modified.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">_TGTCPUTYPE</td>
    <td width="27%">x86</td>
    <td width="46%">Not usually modified.</td>
  </tr>
  <tr VALIGN="top">
    <td width="27%">_TGTOS</td>
    <td width="27%">NT32</td>
    <td width="46%">Not usually modified.</td>
  </tr>
</table>
    <br />
<a name="SSCLIEnvironmentVariablesonUNIXSystem-basedPlatforms"></a><i>Copyright (c) 2006 Microsoft Corporation. All rights reserved.</i>
</body> 
</html>